package _14_Interface;

public class UserServiceImpl implements IUserService{
	public void m1(int i) {
		
	}
	@Override
	public void add(User user) {
		System.out.println("添加成功 : " + user);
	}
	@Override
	public void login(User user) {
		if (!user.getUsername().equals("admin")) {
			System.out.println("用户名不正确!");
		}else if (!user.getPassword().equals("root")) {
			System.out.println("密码错误");
		}else {
			System.out.println("登陆成功,欢迎 " + user.getNickname() + " 回来~");
		}
	}
}
